home *** CD-ROM | disk | FTP | other *** search
- !
- ! Default Fortune Teller script..
- !
- ! (c) DC Software, 1989-1995
- !
-
- !------------------------------------------------------------------------!
- :@TALK ! Talk to the character !
- !------------------------------------------------------------------------!
-
- if player.hp = 0 then
- writeln( player.name, " is dead!" );
- STOP;
- endif;
-
- if npc.picture >= 0 then
- viewpcx(npc);
- endif;
-
- loadtext( npc.text ); ! Get the NPC's text block !
- loadvfl( npc.voice ); ! Get the NPC's voice block !
- ! First, say hello.. !
- if NPC.V0 > 0 then
- writeln( "Hello ", player.name, ". What brings you back?" );
- else
- writeln( "How may I help you?" );
- endif;
-
- ! Now, set some variables..
- NPC.V0 = 1; ! From know on, remember we've been here
-
- L1 = select$( "Tell Fortune", npc.value, "Leave", -1 );
-
- if L1 <> 0 then
- if NPC.V0 > 0 then
- writeln( "As you wish.." );
- else
- writeln( "Fine, but you may live to regret it.." );
- endif;
- goto XSTOP;
- endif;
-
- if npc.value > group.gold then
- writeln( "You don't have enough money.." );
- goto XSTOP;
- endif;
-
- dec( group.gold, npc.value );
- readtext( npc.text );
- goto XSTOP;
-
- !-----------------------------------------------------------------!
- ! All STOPs now lead here so the screen can be restored if needed !
- !-----------------------------------------------------------------!
- :XSTOP
- if npc.picture >= 0 then
- paint(window); ! Assumes the picture fits in the window !
- endif;
- stats(-1); ! Restore Stats area !
- STOP;
-
-